home *** CD-ROM | disk | FTP | other *** search
- Three new reserved words were added in revision 1.05. They were motivated
- by an online game I am writing in OECL. In that game I have to repeat the
- same programming code many times over. I got tired of doing it and almost
- gave up on the game. But I want to finish it to show everyone that OECL is
- a true programming language whose usefulness in not limited to fancy screens
- (although, frankly, that was why I _originally_ created it).
-
- The new features will be helpful not just for my programming. They will be
- equally as useful for you, or so I believe.
-
- The three new reserved words are:
-
- include
- copy
- link
-
- All three are used in connection with a filename. The reserved word and
- the filename have to be inside the same token. In other words, you can
- type [include flag.oec] or [copy ibm.bbs]. But you will not achieve the
- proper results if you type [include][flag.oec] instead. I did it because
- typing too many brackets can get tiring. I am _really_ glad that Mike Janke
- suggested I change the squiggles into brackets!!!
-
- OK, now what does it do:
-
- [ INCLUDE filename.ext ] will read in another OECL file and compile
- it. This accomplished, it will resume the original file and continue com-
- piling. See the enclosed JULY-4.OEC file how it works. You can use this for
- occasional files where you use the same graphics in each, but the rest is
- different. JULY-4.OEC displays the US flag, then says Happy 4th of July. You
- may want to use the same flag on Veterans Day, President's Birthday, etc.
- Rather than having to place the flag right inside each of these files, you
- just include it.
-
- [ COPY filename.ext ] is very similar to include. Unlike that,
- however, it will not compile the included file. It will just copy it into
- your output. This is useful when you have some graphics that you have already
- compiled. Usually you can include such a file with no trouble. But if it
- contains square brackets, it will cause syntax errors. Furthermore, if it
- has a ^Z in the middle of the file, it will think the file ends. OECC treats
- the source code files as text files. When you use the COPY statement, however,
- it will treat the included file as a binary one. The file AD.OEC is an ex-
- ample of its usage.
-
- [ LINK filename.ext ] is not implemented in this version yet. It has
- been made a reserved word because it will be used at proper time. I included
- it in version 1.05 only so you do not use this reserved word as a label and
- do not have to rewrite your programs once the link statement is used. If you
- do use it in this version, OECC will ignore it.
-
- You can nest these statements. You can include (and copy, link) files
- inside an included file. Obviously, that will not help inside a copied file
- as that will not be compiled. But you can use all three in a file you opened
- with the INCLUDE statement. Theoretically there is no limit to how many
- include levels you can use. However, when you come to about the 15th level,
- you run out of stack. I do not see why you would want to nest more than
- 15 include files at the same time. If people find that something like that is
- necessary, I can easily add more stack to the program, but I believe it would
- only increase the size of the program for no good reason. I assume that as an
- OPUS sysop you already have a large enough FILES=xx definition in your
- config.sys.
-
- I am also enclosing a new program called BIN2OEC.EXE. This program
- will allow you to take any binary file and convert it into an OECL source
- file ready to be included in your programs. Of course, you may as well copy
- them directly. But it is here for your convenience. You can use it if a
- caller can only get ASCII downloads from your BBS too: It will convert any
- binary file into a text file. Of course, the caller will need OECC, version
- 1.04 or later, to convert it back into the binary file.
-